package itHeima.lesson7;

public class demo6 {
    public static void main(String[] args) {
        int[] arr1 = null;
        int[] arr2 = null;
        boolean number = isNumber(arr1, arr2);
        System.out.println(number);
    }

    public static boolean isNumber(int[] arr1, int[] arr2) {
        if (arr1 == null && arr2 == null) {
            System.out.println("数组为空,相等");
            return true;
        }

        if (arr1 == null || arr2 == null) {
            System.out.println("一组为空");
            return false;
        }

        if (arr1.length != arr2.length) {
            System.out.println("数组长度不同");
            return false;
        }


        for (int i = 0; i < arr1.length; i++) {
            if (arr1[i] != arr2[i]) {
                return false;
            }

        }
        System.out.println("相等");
        return true;
    }

}
